package com.woniu.woniu_bx.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.woniu_bx.pojo.Goods;
import com.woniu.woniu_bx.pojo.GoodsCategory;
import com.woniu.woniu_bx.pojo.PageBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: Ayang
 * @Date: 2022/8/27 17:31
 * @Description: 商品类别service接口
 */
public interface GoodsCategoryService extends IService<GoodsCategory> {
    /**
     * 添加
     * @param goodsCategory
     */
    boolean add(GoodsCategory goodsCategory);

    /**
     * 修改
     * @param goodsCategory
     */
    boolean update(GoodsCategory goodsCategory);

    //分页查询
    PageBean<GoodsCategory> getByPage(int pageNum,int sizeNum);

    //删除
    boolean deleteById(int id);

    //模糊查询
    List<GoodsCategory> selectByName(@Param("name") String name,@Param("nav")String nav,@Param("status") String status);

    //锁定
    void lock(int id);

    //解锁
    void unlock(int id);

    //换位
    void changeorderNumber(@Param("id1")int id1,@Param("id2")int id2);

    GoodsCategory findByOrderNumber(int orderNumber);

    GoodsCategory findByName(String name);

    //根据序号查询
    List<GoodsCategory> selectByOrderNumberReception();

    //根据类别查找商品
    List<Goods> findByCategoryId(int id);

}
